package java_thinking.unit_14._14_3;

import java_thinking.unit_14.pets.Pet;

import static java_thinking.net.mindview.util.Print.printnb;

/**
 * @Description :
 * @author: cww
 * @DateTime: 2019-03-29 23:17
 */

public class PetCounter4 {
    public static void main(String[] args) {
        TypeCounter counter = new TypeCounter(Pet.class);
        for (Pet pet : Pets.createArray(20)){
            printnb(pet.getClass().getSimpleName() + " ");
            counter.count(pet);
            System.out.println();
            System.out.println(counter);
        }
    }
}
